<cfcontent type="text/xml">
<cfsetting enablecfoutputonly="yes">
<cfinvoke component="cfcs.blog" method="getlatest" returnvariable="qlatest" />
<cfquery name="qsettings" datasource="#request.dsn#">
SELECT * FROM core_settings
</cfquery>
<cfset ndate = #GetHttpTimeString(Now())#>
<cfloop query = "qlatest" startrow="1" endrow="1">
<cfset getlatestdate = CreateDateTime(DatePart("yyyy", b_postedon),DatePart("m", b_postedon),DatePart("d", b_postedon),DatePart("h", b_postedon),DatePart("n", b_postedon),DatePart("s", b_postedon))>
<cfset ldate = #GetHttpTimeString(getlatestdate)#>
</cfloop>
<cfsavecontent variable="blogheaderxml">
<cfset desc = replace(qsettings.meta_description, "'", "&##39;", "ALL")>
<cfoutput>
<blog>
</cfoutput>
</cfsavecontent>
<cfsavecontent variable="blogxml">
<cfloop query="qlatest" endrow="15">
<cfset makepostdate = CreateDateTime(DatePart("yyyy", b_postedon),DatePart("m", b_postedon),DatePart("d", b_postedon),DatePart("h", b_postedon),DatePart("n", b_postedon),DatePart("s", b_postedon))>
<cfset pdate = #GetHttpTimeString(makepostdate)#>
<cfif qlatest.currentrow eq 1><cfset grabthisdate = pdate></cfif>
<cfset primecat = listgetat(qlatest.categories, 1)>
<cfquery name="qcat" datasource="#request.dsn#">
SELECT * FROM blog_categories
WHERE id = <cfqueryparam value="#primecat#" cfsqltype="cf_sql_integer">
</cfquery>
<cfset blink = "#request.secureurl#blog/#b_year#/#b_month#/#b_day#/#b_file#?mo=#b_month#&yr=#b_year#">
<cfset thecontent = replacenocase(b_content, "/images/", "#request.secureurl#images/", "ALL")>
<cfoutput>			
<cfset the_day = dateformat(b_postedon, "d")>
<cfset the_month = dateformat(b_postedon, "mm")>
<cfset the_year = dateformat(b_postedon, "yyyy")>
<post>
<title>#xmlFormat(b_title)#</title>
<link>#xmlFormat(blink)#</link>
<brief>#xmlFormat(REReplace(b_brief,"<[^>]*>","","All"))#</brief>
<fullarticle>#xmlFormat(thecontent)#</fullarticle>
<category>#xmlFormat(qcat.cname)#</category>
<pubDate>#xmlFormat(pdate)#</pubDate>
</post>
</cfoutput>
</cfloop>
</cfsavecontent>
<cfset loadtherss = trim(blogheaderxml & blogxml & "</blog>")>
<cfsetting enablecfoutputonly="no">
<cfoutput><cfcontent type="text/xml"><?xml version="1.0" encoding="ISO-8859-1" ?>#loadtherss#</cfoutput>